﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HRM.Entity;

namespace HRM.DAL
{
    public class EducationLevelDAL: BaseDAL
    {
        public List<EducationLevel> GetAll()
        {
            return Repository.All<EducationLevel>().ToList();
        }

        public EducationLevel GetByID(int ID)
        {
            return Repository.Single<EducationLevel>(item => item.ID == ID);
        }

        public EducationLevel Add(EducationLevel item)
        {
            Repository.Add<EducationLevel>(item);
            return item;
        }

        public void Delete(int ID)
        {
            Repository.Delete<EducationLevel>(ID);
        }

        public EducationLevel Update(EducationLevel item)
        {
            Repository.Update<EducationLevel>(item);
            return item;
        }
    }
}
